<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8" />
      <title>vue中的数组</title>
      <script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
   </head>
   <body >
     <div id="app">
		<ul>
		<li :key='item.id' v-for='item in emps'>{{item.name}}</li>
		</ul>
		
		<ol>
			<li v-for="v in user">{{v}}</li>
		</ol>
     </div>
    <script>
       //1. 实例化一个Vue的实例
       let vm=new Vue({
          el:'#app', 
          data:{ 
	        emps:[
				{
					id:1001,
					name:'haoren'
				},
				{
					id:1002,
					name:'lucy'
				},
				{
					id:1003,
					name:'lily'
				},
				{
					id:1004,
					name:'jerry'
				},
				{
					id:1005,
					name:'batman'
				}
			],
			user:{
				id:1001,
				name:'李四',
				major:'互联网+',
				gender:'男'
			}
          }
         });
    </script>
    </body>
</html>
